package asteroids.model.programs.statements;

import asteroids.model.programs.parsing.ProgramFactory.ForeachType;

public class Foreach extends Statement {

	public Foreach(int line, int column, ForeachType type, String variableName, Statement body) {
		super(line, column);
		this.type = type;
		this.variableName = variableName;
		this.body = body;
	}

	@Override
	public void accept(StatementRunner sv) {
		sv.run(this);
	}
	
	public ForeachType getType() {
		return type;
	}
	
	private final ForeachType type;
	
	public String getVariableName() {
		return variableName;
	}
	
	private final String variableName;

	public Statement getBody() {
		return body;
	}

	private final Statement body;
	
}